<?php

spl_autoload_register("myAutoLoad");

/*
    自动加载类
*/
function myAutoLoad($class_name = '')
{
    $classPath = getClassPath();

    if(isset($classPath[$class_name])){
        include_once($classPath[$class_name]);
    }
}
function getClassPath()
{
    $res = array(
        "BdApiController" => "../Controller/BdApiController.php",
        "MtApiController" => "../Controller/MtApiController.php",
        "ElemeApiController" => "../Controller/ElemeApiController.php",
        "JddjApiController" => "../Controller/JddjApiController.php",
        "CommonController" => "../Controller/CommonController.php",

        "BdApiModel" => "../Model/business/BdApiModel.php",
        "MtApiModel" => "../Model/business/MtApiModel.php",
        "ElemeApiModel" => "../Model/business/ElemeApiModel.php",
        "JddjApiModel" => "../Model/business/JddjApiModel.php",
        "StoreModel" => "../Model/business/StoreModel.php",
        "ProductModel" => "../Model/business/ProductModel.php",
        "ChannelStoreModel" => "../Model/business/ChannelStoreModel.php",
        "ChannelCategoryModel" => "../Model/business/ChannelCategoryModel.php",
        "ChannelProductModel" => "../Model/business/ChannelProductModel.php",


        "BdCronModel" => "../Model/business/BdCronModel.php",
        "MtCronModel" => "../Model/business/MtCronModel.php",
        "ElemeCronModel" => "../Model/business/ElemeCronModel.php",
        "JddjCronModel" => "../Model/business/JddjCronModel.php",


        "MyRedis" => "../Model/library/MyRedis.php",

        "GetElemeToken" => "../Model/library/ElemeSdk/GetElemeToken.php",
        "Config" => "../Model/library/ElemeSdk/Config.php",
        "OAuthClient" => "../Model/library/ElemeSdk/OAuthClient.php",
        "IllegalRequestException" => "../Model/library/ElemeSdk/IllegalRequestException.php",


        "BaiDuCommon" => "../Model/service/baidu/BaiDuCommon.php",
        "BaiDuCategorySvc" => "../Model/service/baidu/BaiDuCategorySvc.php",
        "BaiDuProductSvc" => "../Model/service/baidu/BaiDuProductSvc.php",
        "BaiDuStoreSvc" => "../Model/service/baidu/BaiDuStoreSvc.php",

        "ElemeCommon" => "../Model/service/eleme/ElemeCommon.php",
        "ElemeCategorySvc" => "../Model/service/eleme/ElemeCategorySvc.php",
        "ElemeProductSvc" => "../Model/service/eleme/ElemeProductSvc.php",
        "ElemeStoreSvc" => "../Model/service/eleme/ElemeStoreSvc.php",

        "JddjCommon" => "../Model/service/jddj/JddjCommon.php",
        "JddjCategorySvc" => "../Model/service/jddj/JddjCategorySvc.php",
        "JddjProductSvc" => "../Model/service/jddj/JddjProductSvc.php",
        "JddjStoreSvc" => "../Model/service/jddj/JddjStoreSvc.php",

        "MtCommon" => "../Model/service/meituan/MtCommon.php",
        "MtCategorySvc" => "../Model/service/meituan/MtCategorySvc.php",
        "MtProductSvc" => "../Model/service/meituan/MtProductSvc.php",
        "MtStoreSvc" => "../Model/service/meituan/MtStoreSvc.php",
    );

    return $res;
}
?>